package com.guigu.xiaowenbo.service.impl;

import com.guigu.xiaowenbo.mapper.SpayMapper;
import com.guigu.xiaowenbo.mapper.SpaydetailsMapper;
import com.guigu.xiaowenbo.pojo.Spay;
import com.guigu.xiaowenbo.pojo.Spaydetails;
import com.guigu.xiaowenbo.service.SpaydetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpaydetailsServiceImpl implements SpaydetailsService {
    @Autowired(required = false)
    SpaydetailsMapper spaydetailsMapper;
    @Autowired(required = false)
    SpayMapper spayMapper;
    public int insertres(Spaydetails spaydetails){
        return spaydetailsMapper.insertres(spaydetails);
    }
    public List<Spaydetails> selectrws(Integer parentid){
        return spaydetailsMapper.selectrws(parentid);
    }
    public Spay selectrwid(Integer id){
        return spayMapper.selectrwid(id);
    }
    public List<Spaydetails> selectrwddd(Integer parentid){
        return spaydetailsMapper.selectrwddd(parentid);
    }
    public Spaydetails selectrwdp(Integer parentid, String productid){
        return spaydetailsMapper.selectrwdp(parentid,productid);
    }
    public int updaterwds(Integer parentid,String productid){
        return spaydetailsMapper.updaterwds(parentid,productid);
    }
    public List<Spaydetails> selectrwdrs(Integer parentid){
        return spaydetailsMapper.selectrwdrs(parentid);
    }
    public int updaterwdrses(Integer parentid,String productid,Integer paidamounts){
        return spaydetailsMapper.updaterwdrses(parentid,productid,paidamounts);
    }
    public int updaterwdrs(Integer parentid,String productid,Integer paidamount){
        return spaydetailsMapper.updaterwdrs(parentid,productid,paidamount);
    }

    @Override
    public int insert_WZY(Spaydetails spaydetails) {
        return spaydetailsMapper.insert_WZY(spaydetails);
    }
}
